Pseudo-code:
Global variables:
Constants using define declarations
o MAXN – the maximum number of characters in a band name
o MAXG – the maximum number of concerts/bands/groups
o MAXC – the maximum number of categories
Arrays:
o char group [MAXG][MAXN]– the name of each group
o int fans [MAXG][MAXC]– the number of fans at a concert by category
o float prices [MAXC]– the ticket price of each category
o float sales [MAXG]– the total value of the tickets for each concert
int count
o the actual number of active concerts/bands/groups
o this number is determined at run time in the getData function
o used throughout the rest of the program to only look at data in the
group, fans and salesarrays that is actually active.
Pseudo-Code:
1. main
a. getData – get ticket prices by category & get data for the concerts
b. computeSales – compute sales for each concert
c. printArray – print raw concert data
d. sortBySales – sort the concerts by value of sales, use selection sort
i. findMinSales – find min sales in unsorted rest of array
ii. switchRows – as needed
e. printArray – print sorted concert data
2. getData
a. prompt for ticket prices
b. get ticket prices into prices array
c. prompt for band name and fans in each category at each concert
d. insert data into appropriate arrays, ending with a period
i. loop on concert
1. get group name
2. loop inside on number of categories
3. computeSales
a. for each group
i. sales for that group = 0
Pseudo-code:
Global variables:
Constants using define declarations
o MAXN – the maximum number of characters in a band name
o MAXG – the maximum number of concerts/bands/groups
o MAXC – the maximum number of categories
Arrays:
o char group [MAXG][MAXN]– the name of each group
o int fans [MAXG][MAXC]– the number of fans at a concert by category
o float prices [MAXC]– the ticket price of each category
o float sales [MAXG]– the total value of the tickets for each concert
int count
o the actual number of active concerts/bands/groups
o this number is determined at run time in the getData function
o used throughout the rest of the program to only look at data in the
group, fans and salesarrays that is actually active.
Pseudo-Code:
1. main
a. getData – get ticket prices by category & get data for the concerts
b. computeSales – compute sales for each concert
c. printArray – print raw concert data
d. sortBySales – sort the concerts by value of sales, use selection sort
i. findMinSales – find min sales in unsorted rest of array
ii. switchRows – as needed
e. printArray – print sorted concert data
2. getData
a. prompt for ticket prices
b. get ticket prices into prices array
c. prompt for band name and fans in each category at each concert
d. insert data into appropriate arrays, ending with a period
i. loop on concert
1. get group name
2. loop inside on number of categories
3. computeSales
a. for each group
i. sales for that group = 0
ALL DOCUMENTS ON THIS PAGE ARE ON OFFER FROM 05/08/2024-07/011/2024
NURSING EXAMS AND TEST BANKS. Contact us, https://www.docsity.com/en/users/profile/HESISOLUTIONS/
to fetch it for you in minutes if we do not have it in this shop .BUY WITHOUT DOUBT!!!!Always leave a review after purchasing any document so as to make sure our customers are 100% satisfied.
ati ati comprehensive predictor ati fundamentals proctored ati pharmacology ati pharmacology proctored community health comprehensive health care health care / nursing health care/ nursing healthcare hesi hesi rn exit leadership maternal newborn med surg medical surgical mental health nurs nursing nursing & health pediatrics pharmacology test bank tncc
Knoowy is een goede website. Het heeft veel aanbod en het werkt fijn.
Ik vind Knoowy de max! Door de hulp van andere studenten kan ik mijn examens makkelijker halen.
Knoowy neemt toch wel wat stress voor de examenperiode weg. De samenvattingen geven een goede houvast bij het studeren waardoor je zekerder wordt van jezelf bij het studeren. Ideaal voor wie in tijdsnood zit of gewoon een extra overzicht wil hebben van het vak.
Jullie website is top! Het heeft me al veel geholpen. Zeker omdat ik thuis studeer!
Prima database om studiemateriaal uit te halen, goed toegankelijk, eenvoudig zoeken.
De documenten zijn duidelijk en goed samengevat. Het is fijner leren dan vanuit het boek.
Een handige site voor het aankopen van samenvattingen voor examens.
Betrouwbaar platform om kwaliteitsvolle samenvattingen te vinden en een aangename en gemakkelijke website om te gebruiken